SetDirectory["C:/drorbn/AcademicPensieve/Projects/Arrow_Diagrams_and_gl(N)"];
<< "Arrow_Diagrams_and_gl(N).m"

se[1,i,j] stands for Aij;
se[2,i,j] stands for Bij;
se[3,i,j] stands for Dij.
Commutation relations come from http://katlas.math.toronto.edu/drorbn/bbs/show?shot=Leung-090227-132523.jpg

Testing

bb[se1_,se2_,se3_] := Expand[b[se1, se2] /. se0_se :> b[se0, se3]];
Jac[se1_,se2_,se3_] := bb[se1, se2, se3] + bb[se2, se3, se1] + bb[se3, se1, se2]

b[se[111], se[112]]

bb[se[111], se[112], se[112]]

Jac[se[111], se[114], se[214]]

Jac[se[343],se[221],se[113]]

Union[Flatten[Outer[
(Jac[
se[salpha[#1[[1]], #2[[1]], #2[[2]]]],
se[salpha[#1[[2]], #2[[3]], #2[[4]]]],
se[salpha[#1[[3]], #2[[5]], #2[[6]]]]
]*
J[
se[salpha[#1[[1]], #2[[1]], #2[[2]]]],
se[salpha[#1[[2]], #2[[3]], #2[[4]]]],
se[salpha[#1[[3]], #2[[5]], #2[[6]]]]
])&,
 OrderTypes[3], OrderTypes[6], 1
]]]

{s1,s2,s3}={se[111],se[313],se[223]}

Jac[s1,s2,s3]

b[s1,s2]

Diagrams[2ar]

USO[Diag[ar[1,2],ar[3,4]]]

USO[Take[R/@ Diagrams[1ar+ R6T], 2]]

l=Length[rels=R/@ Diagrams[1ar+ R6T]]

USO[List @@ rels[[1]]]

Total[USO[List @@ rels[[1]]]]

l=Length[rels=R/@ Diagrams[1ar+ R6T]];
Table[
Print[{i,rels[[i]], Timing[uso=USO[rels[[i]]]]}];
uso,
{i,l}
]

USO[Diag[ar[1,2],ar[3,4],ar[5,6]]]

diag=BasisAArrow[4][[101]]

USO[diag]

diag1=BasisAArrow[4][[1]]

USO[diag1]